﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.IO;

namespace Dukou.Javascript
{
    public class JsBase
    {
        public JsBase(HtmlHelper htmlHelper)
        {
            this.HtmlHelper = htmlHelper;
        }

        public HtmlHelper HtmlHelper { get; protected set; }

        public TextWriter Writer
        {
            get
            {
                if (HtmlHelper == null)
                {
                    return null;
                }

                return this.HtmlHelper.ViewContext.Writer;
            }
        }
    }
}
